<?php
/**
 * common model file Created by PhpStorm.
 * User: wumengmeng
 * Date: 2019/08/20
 * Time: 06:01
 */

namespace HiCommon\Model;

class Protocol extends Base
{

    protected $table = 'protocol';

    protected $guarded = [];

    //public $timestamps = false;

    /**
     * 应该被调整为日期的属性
     *
     * @var array
     */
    protected $dates = [

    ];


    /**
     * 获取状态对应的名称
     *
     * @return array
     * @author wumengmeng <wu_mengmeng@foxmail.com>
     */
    public function getTypeAttribute($value)
    {
        switch ($value)
        {
            case 1:
                $res = ['id'=>1,'name'=>'用户端-设置-隐私政策'];
                break;
            case 2:
                $res = ['id'=>2,'name'=>'用户端-设置-用户协议'];
                break;
            case 3:
                $res = ['id'=>3,'name'=>'用户端-门店加盟'];
                break;
            case 4:
                $res = ['id'=>4,'name'=>'用户端-设置-关于信达'];
                break;
            case 5:
                $res = ['id'=>5,'name'=>'用户端-免责说明'];
                break;
            case 6:
                $res = ['id'=>6,'name'=>'商户端-设置-服务协议'];
                break;
            case 7:
                $res = ['id'=>7,'name'=>'用户端-道路救援-服务协议'];
                break;
//            case 8:
//                $res = ['id'=>8,'name'=>'帮助中心'];
//                break;
            case 9:
                $res = ['id'=>9,'name'=>'用户端-Vip升级说明'];
                break;
            case 10:
                $res = ['id'=>10,'name'=>'小程序-免责说明'];
                break;
            case 11:
                $res = ['id'=>11,'name'=>'商户端-入驻说明'];
                break;
            case 12:
                $res = ['id'=>12,'name'=>'商户端-签订协议'];
                break;
            default:
                $res = ['id'=>-1,'name'=>'未知'];
        }
        return $res;
    }





}